# 键盘组合键
import time

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.get("https://www.baidu.com/")
driver.find_element_by_id("kw").send_keys("天气之子")
driver.find_element_by_id("su").click()
driver.find_element_by_id("kw").send_keys(Keys.CONTROL,"a")
time.sleep(3)
driver.find_element_by_id("kw").send_keys(Keys.CONTROL,"x")
time.sleep(3)
driver.find_element_by_id("kw").send_keys("千与千寻")
driver.find_element_by_id("su").click()
time.sleep(3)
driver.quit()

